AUX_SOURCE_DIRECTORY(src LIB_PMC_STORAGE_MANAGE_SRC)
list(SORT LIB_PMC_STORAGE_MANAGE_SRC)
set(SML_PMC sml_pmc_open)
ADD_LIBRARY(${SML_PMC} SHARED ${LIB_PMC_STORAGE_MANAGE_SRC})

INCLUDE_DIRECTORIES(inc)
INCLUDE_DIRECTORIES(${GLIB_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(../smlib)
INCLUDE_DIRECTORIES(../platform)

# 依赖头文件
target_link_libraries(${SML_PMC}
    PUBLIC ${GLIB_LIBRARIES}
    PUBLIC platform_open
)

SET_TARGET_PROPERTIES(${SML_PMC} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
SET_TARGET_PROPERTIES(${SML_PMC} PROPERTIES VERSION 0.1.0 SOVERSION 0)

INSTALL(TARGETS ${SML_PMC} LIBRARY DESTINATION usr/lib64)